package com.wl.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

@Getter
@Setter
@TableName("message")
public class Message implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(value = "mid")
    private Integer mid;

    @NotNull
    @TableField(value = "sid")
    private Integer sid;

    @NotNull
    @TableField(value = "rid")
    private Integer rid;

    @TableField(value = "content")
    private String content;

    @TableField(value = "ctime")
    private LocalDateTime ctime;

    //是否已读（0：未读，1：已读）
    @TableField(value = "`read`") // 添加反引号
    private Integer read;
}
